package org.huangrui.javase.collectionMap.collection;

import org.junit.Test;

import java.util.Vector;

/**
 * @Author hr
 * @Create 2025-11-07 13:49
 **/
public class T02Vector {
    @Test
    public void test1(){
        Vector<Integer> vector = new Vector<>();
        for(int i = 1; i<= 10; i++){
            vector.add(i);
        }

        vector.add(11);
    }
    @Test
    public void test2(){
        Vector<Integer> vector = new Vector<>(5,1);//指定初始化容量和增量
        for(int i = 1; i<= 5; i++){
            vector.add(i);
        }
        vector.add(11);
    }
}
